using UnityEngine.UI;
using UnityEngine;

public class Smartwatch : MonoBehaviour
{
	public Text healthText;

	public Text armorText;

	public Text capacityText;

	private void FixedUpdate()
	{
		healthText.text = DO.Campaign.playerHealth.ToString("0") + "%";
		if (CampaignGame.Instance.player.body.baseArmor > 0f)
		{
			armorText.text = (CampaignGame.Instance.player.body.armor / CampaignGame.Instance.player.body.baseArmor).ToString("P0");
			armorText.text = armorText.text + "\n<size=\"20\">" + CampaignGame.Instance.player.body.armor.ToString("0") + "/" + CampaignGame.Instance.player.body.baseArmor.ToString("0") + "</size>";
		}
		else
		{
			armorText.text = "--";
		}
		if ((bool)CampaignGame.Instance.player.weapon)
		{
			capacityText.text = ((float)CampaignGame.Instance.player.weapon.ammo / (float)CampaignGame.Instance.player.weapon.capacity).ToString("P0");
			capacityText.text = capacityText.text + "\n<size=\"20\">" + CampaignGame.Instance.player.weapon.ammo.ToString("0") + "/" + CampaignGame.Instance.player.weapon.capacity.ToString("0") + "</size>";
		}
		else
		{
			capacityText.text = "--";
		}
	}
}
